package com.aiyige.page.my.settings;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;

import com.aiyige.BuildConfig;

/**
 * Created by xiachao on 2017/12/19.
 */

public class VersionUtil {

    /**
     * 获取当前版本
     *
     * @param context
     * @return
     */
    public static String getCurrentVersion(Context context) {
        try {
            return BuildConfig.VERSION_NAME + "-" + BuildConfig.VERSION_CODE;
        } catch (Exception e) {
            return "";
        }
    }
}
